package com.hengxinguotong.zhihuichengjian.weekpicker.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Month {

    private int year;
    private int month;

    /**
     * 获取年月 (yyyy-MM)
     * @return String
     */
    public String getYearAndMonth1() {
        if(month < 10){
            return year + "-0" + month;
        }
        return year + "-" + month;
    }

    /**
     * 获取年月 (yyyy/MM)
     * @return String
     */
    public String getYearAndMonth2() {
        if(month < 10){
            return year + "/0" + month;
        }
        return year + "/" + month;
    }

    /**
     * 获取年月 (yyyy年MM月)
     * @return String
     */
    public String getYearAndMonth3() {
        return year + "年" + month + "月";
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }
}